package com.example.emos.wx.controller;


import com.alibaba.fastjson.JSONObject;
import com.example.emos.wx.common.ResultVO;
import com.example.emos.wx.service.TbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author MC鹏浩
 * @since 2021-03-02
 */
@RestController
@RequestMapping("/tb-user")
public class TbUserController {

    @Autowired
    private TbUserService tbUserService;

    @PostMapping
    public ResultVO<Void> wxLogin(@RequestBody String code){

        JSONObject parse = JSONObject.parseObject(code);
        String code1 = (String)parse.get("code");
        tbUserService.getWxLogin(code1);

        return null;
    }

}

